package com.lolineet.user.controller;

import com.lolineet.entity.user.SysMenu;
import com.lolineet.result.Result;
import com.lolineet.user.service.ISysMenuService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lolineet
 * @since 2025-04-17
 */
@Tag(name = "系统菜单接口")
@RestController
@RequestMapping("/user/sysMenu")
public class SysMenuController {

    @Resource
    private ISysMenuService sysMenuService;

    @GetMapping("/list")
    @Operation(summary = "获取菜单列表")
    public Result getMenuList() {
        List<SysMenu> menuList = sysMenuService.getMenuList();
        return Result.ok(menuList);
    }
}
